package com.jweb.framework.core.support;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public abstract class TRACER {
	
	private static final Logger logger = LoggerFactory.getLogger(TRACER.class);
	
	private static String print(String msg){
		StringBuffer sb = new StringBuffer(128);
		sb.append("::TRACER::").append(msg);
		return sb.toString();
	}
	
	public static final void trace(String msg){
		if(logger.isTraceEnabled()){
			logger.trace(print(msg));
		}
	}
	
	public static final void trace(String msg , String[] vals){
		if(logger.isTraceEnabled()){
			logger.trace(print(msg) , vals);
		}
	}
	
	public static final void trace(String msg , Object[] objs){
		if(logger.isTraceEnabled()){
			logger.trace(print(msg) , objs);
		}
	}
	
	public static final void trace(String msg , Throwable throwable){
		if(logger.isTraceEnabled()){
			logger.trace(print(msg) , throwable);
		}
	}
	
}
